package ar.pmt.gwt.client.recurso.store;

import ar.pmt.vista.beans.RecursoBean;

import com.gwtext.client.data.FieldDef;
import com.gwtext.client.data.FloatFieldDef;
import com.gwtext.client.data.JsonReader;
import com.gwtext.client.data.Reader;
import com.gwtext.client.data.RecordDef;
import com.gwtext.client.data.StringFieldDef;

public class AltaModificacionRecursoStore {
	
	public static Reader getAltaModificacionReader(){
		final RecordDef recordDef = new RecordDef(new FieldDef[]{  
				 new StringFieldDef(RecursoBean.getUnicoIdID()),
				new StringFieldDef(RecursoBean.getNombreID()),  
                new StringFieldDef(RecursoBean.getApellidoID()),
                
                new StringFieldDef(RecursoBean.getPaisIsoID()), 
                new StringFieldDef(RecursoBean.getIdiomaID()), 
                new StringFieldDef(RecursoBean.getGtmID()), 
                new StringFieldDef(RecursoBean.getEmailID()),
                new StringFieldDef(RecursoBean.getTelTrabajoID()),
                new StringFieldDef(RecursoBean.getTelCasaID()),
                new StringFieldDef(RecursoBean.getSmsID()),
                new StringFieldDef(RecursoBean.getChatID()),
                new StringFieldDef(RecursoBean.getPasswordID()),
                
                
                
                /*new StringFieldDef(RecursoBean.getEmailID(), "estado"),  
                new StringFieldDef("estadopmt", "estadopmt"),*/  
                  
        });  
        final JsonReader reader = new JsonReader(recordDef);  
        return reader;
	}
	
	public static Reader getBuscarRecursoReader(){
		RecordDef recordDef = new RecordDef(new FieldDef[] {
				new StringFieldDef("unicoId"), new FloatFieldDef("apellido"),
				new FloatFieldDef("nombre"), });

		final JsonReader reader = new JsonReader(recordDef);
		reader.setRoot("");   
        return reader;
	}
	
	

}
